from frontend.roleApplication import RoleApplication
from frontend.form import Type

class MuscleApp(RoleApplication):
   
    def __init__(self):
        
        super(MuscleApp, self).__init__("BreakALeg", "Muscle") # use actual work flow name and role name
        self.register_transition_step("TakeAction", self.muscle_decide_form_creator, name_fields=["sequence", "Nationality", "BusinessType"]) # use actual name for this task
        self.register_sink_step("Kill", self.kill_form_creator, name_fields=["sequence", "Nationality", "BusinessType"]) # use actual name for this task

    def muscle_decide_form_creator(self, stepname, form):        
        form.add_static_label('How do you want to enforce:')
        form.add_field(Type.CHOICE, "TakeAction", choices=['Convince', 'Rough Up', 'Break Finger', 'Break Leg'])

    def kill_form_creator(self, stepname, form):        
        form.add_static_label('How do you want to kill your victim?')
        form.add_field(Type.CHOICE, "KillMethod", choices=['Piano Wire', 'Dexter Him', 'Sniper'])

if __name__ == '__main__':
    app = MuscleApp()
    app.MainLoop()